home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir36
/
clktmr42.zip
/
CLKTIMER.DOC
< prev
Wrap
Text File
|
1994-02-20
|
22KB
|
459 lines
CLKTIMER - Clock and task performing TSR (v4.20)
Copyright 1994 by Roger Brook
MEMORY REQUIREMENT: less than 3K bytes for an 8 task stack
INTERRUPT VECTORS ATTACHED: 09h, 1Ch, 21h, 22h
PURPOSE: A TSR to perform tasks at designated times. Tasks that can
be performed include displaying the current time (and
optionally date) in the upper right hand corner of the
screen, sounding and displaying an alarm in the upper left
hand corner of the screen, booting the computer, and
forcing keystrokes into the keystroke buffer to start or
terminate a DOS program.
Keystroke tasks (a sequence of keystrokes) can be performed
at a set time, each hour at a specified number of minutes
after the hour, or after the computer has been idle for a
specified number of seconds.
CLKTIMER is intended to used in a batch file to set up a
sequence of tasks to be performed on an unattended basis.
CLKTIMER can be run anytime, with new tasks added to the list
of tasks to be performed, or old tasks disabled.
SYNTAX: CLKTIMER /[a,b,c,d,i,r,u,w,x][u,a,d] [nn[:nn]] [[?]string]
The slash is interpreted as the start of another delimited
argument on the command line; therefore every argument must
begin with a slash. The square brackets in the syntax line
above denote optional parameters, and should not be used as a
part of the arguments. Recognized arguments are listed
below. Any unrecognized argument will cause the program to
display a help screen of information similar to this syntax
section. Arguments can be concatenated upto the allowed
length of the command line (or a maximum of 256 characters).
Recognized arguments which must follow immediately after the
slash are (case not significant):
a = set alarm time and message
alarm will both chime and display the specified
message; chime will end when the next key is pressed
by the user; message displayed for one minute;
b = set boot time
computer will boot at the beginning of the minute
of the hour specified;
c = set clock only display
will disable date display if it was previously set;
display is in reverse video in the upper right hand
corner of the screen
d = set clock and date display
will override clock only display if it was
previously set; display is in reverse video in the
upper right hand corner of the screen
h = set chime for sounding the hour;
i = set idle time (seconds) and command
idle time count is reset for each key pressed;
r = set repeat time (minutes after the hour) and command;
s = display the current task settings
u = unload (remove) all events from the stack
affects on a, b, r and x options set which
are the only ones put on the stack; should be the
first option on the command line
w = set time to wait until executing a command
can set only one time increment (hours and minutes)
from the current time for the task to be executed
x = set execute time and command
Secondary flags which must follow immediately after the
argument character are:
a = mark this task to be done only if a DOS program is
not running at the specified time
u = mark this task to be done at the specified time, even
if a DOS program is running
d = delete the task previously set for the time specified
For example:
CLKTIMER /a 12:00 'LUNCH TIME' set an alarm for 12:00
(noon) to display the
message LUNCH TIME
CLKTIMER /ad 12:00 disable the alarm
previously set for 12:00,
but keep the same display
string
Specifying the time is done in a 24 hour format for alarm
times, boot times and time to execute a task, and uses two
number separated by a colon ( : ); a zero will be assumed if
the number of minutes is not specified. For the repeat time
(minutes after the hour) and the idle time (number of
seconds) only a single number is used. Hours must be in the
range [0..23], minutes and seconds must be in the range
[0..59]. A blank in the time specification will be assumed
to be a zero.
The command string or alarm display string are after the time
specification for the argument. The string is generally a
combination of text delimited by quote marks ( ' ) and
representations of special keystrokes. Special keystrokes
include any decimal ASCII representation of a keystroke (for
example the carriage return or enter key is 013), or a scan
code which begins with the at sign ( @ ). Scan codes are not
tested for accuracy, only inserted into the keystroke buffer.
Therefore, extended keyboard scan codes can be used if your
computer recognized an extended keyboard. Since the keyboard
buffer is manipulated directly, there can be a maximum of 16
keystrokes specified.
If a command string begins with the question mark character
( ? ), this is interpreted to mean that a reboot is desired
instead of pushing the string into the keyboard buffer.
The remainder of the command string is ignored, and a reboot
begins immediately.
The first time the program is run, the task settings specified
are loaded with the TSR version of the program. If the program
is already loaded, then the arguments will modify the task
settings of the TSR version of the program (i.e. will change
the memory resident data storage). The program will run in
high memory, but cannot find itself in high memory for
subsequent commands.
DEFAULTS: The task information is stored in a stack format. The default
stack size is 8 events (Alarm, Boot, Repeat and eXecute). The
size of the task stack con be increased on request when
CLKTIMER is registered, or at no charge for registered versions
with a written request and a diskette in a self-address, stamped
mailer. The Idle and Wait tasks have there own data area with
a limit of one task for each. Defaults for each task are
as follows:
a time defaults to 00:00
display defaults to a null string
task is DOS unaware
there are no alarms set initially
b boot time defaults to 00:00
task is DOS unaware
there are not boot times set initially
c clock display defaults to off
task is DOS unaware
d date and clock display defaults to off
task is DOS unaware
h hour chime defaults to off (not sounded)
task is DOS unaware
i time defaults to 300 seconds
command defaults to 'C:\IDLE' 013 or previous setting
task is DOS aware
the idler timer defaults to off
r time defaults to 00 minutes after each hour
command defaults to a null string
task is DOS aware
there is no repeat time set initially
w time defaults to 00:00 increment from the current time
command defaults to null string or previous setting
task is DOS aware
there is not wait time set initially
u unload option is always DOS unaware
x time defaults to 00:00
command defaults to a null string
task is DOS aware
there are no execute times set initially
EXAMPLES:
CLKTIMER /a 16:45 'Clean up time'
set an alarm task for 4:45 pm to display Clean up time
CLKTIMER /b2:59
set a task to boot the computer at 2:59 am
CLKTIMER /c /h
set two tasks, one to display the clock in the upper
right hand corner of the display (this will disable the
date display if previously set) and one to toggle the
hour chime (will be turned on if this is the first time
CLKTIMER is run)
CLKTIMER /D
set a task to display the date and time in the upper
right hand corner of the display
CLKTIMER /h
toggle the hour chime (turn it on if previously off, or
turn it off if previously on)
CLKTIMER /I 60
set a task to monitor the idle status of the computer
and to start the program C:\IDLE after the computer has
been idle for 60 seconds
CLKTIMER /i60 'C:\bat\idle.bat' 013
set a task to monitor the idle status of the computer
and to start the batch program C:\BAT\IDLE.BAT after the
computer has been idle for 60 seconds
CLKTIMER /ru55
set a task to start the program C:\REPEAT at 55 minutes
after every hour (24 hours per day); task will be DOS
unaware (will be done even if a DOS program is running)
CLKTIMER /S
display the current status and list of tasks set for the
copy of CLKTIMER which is resident in memory (TSR)
CLKTIMER /u
unload (erase) all pending events (type a, b, r and x)
from the stack; return the stack to default (empty)
condition
CLKTIMER /w1:00 'wait_1hr' 13
set a task that at 1 hr and 00 minutes from the current
time will start the program WAIT_1HR (the DOS PATH will
be searched for the program)
CLKTIMER /w1:00'?reboot'
set a task that at 1 hr and 00 minutes from the current
time will reboot the computer
CLKTIMER /x9:20 'at9_20' 13
set a task that at 9:20 am will start the program AT9_20
(the DOS PATH will be searched for the program)
CLKTIMER /da /h /i120 /a12:00'LUNCH TIME' /B2
set a task to display date and time (date and time task
is DOS aware, and so will not display if a DOS program
is running), toggle the hour chime, set a task to monitor
the idle status and start the program C:\IDLE after 120
seconds of being idle, set an alarm task to display
LUNCH TIME at 12:00 (noon) and set a task to boot the
computer at 2:00 am
CAUTIONS: DOS BIOS calls have been used as much as possible
to help maintain compatibility with different operating
system implementations. The major exception is the direct
manipulation of the keyboard buffer and getting the time bytes
Time information is take directly from the BIOS data area,
and so programs may not work correctly if your BIOS does not
follow MS-DOS convention for location of this information.
Keystrokes are stuffed directly into the DOS keyboard buffer,
and so programs may not work correctly if your BIOS or other
TSR's do not follow MS-DOS convention for location of this
data.
Date information is obtained from DOS when the program is
first run, and then updated internally. Date information is
also updated anytime the CLKTIMER program is run. Therefore,
changing the date from the command line will change the
displayed date the next time CLKTIMER is run. It should
be aware of leap years, and varying number of days per month.
The information written to the screen is updated
approximately once each second. If it scrolls off the top of
the screen, wait one second and it should reappear.
CLKTIMER looks for itself only in low memory. Therefore, it
is recommended that the program not be loaded in high memory.
User experience indicates that CLKTIMER will perform correctly
when loaded in high memory for commands that are included at
the time of initial loading. However, CLKTIMER cannot find
itself in high memory, so subsequent changes will actually
load a second copy in low memory.
The time, date and alarm information will only be displayed
for 40 or 80 column text modes (int 10h, modes 0-3 and 7).
In other screen modes, all other functions (including chimes)
still work.
Windows 3.x: the boot feature and the chimes will work when
Windows is running; there will be no screen display unless
you have a DOS window running with the correct screen mode;
the function of the keystroke buffer under Windows has not
been investigated.
UPGRADES: Version 2.01 fixed timer jump error which caused date to be
incremented after each minute of the first hour of the day;
changed time routine to get timer information directly from
BIOS data area instead of using 1Ah interrupt; moved repeat
code so that it is executed only if DOS is not active
(as specified in documentation). 31Aug92
Version 2.02 fixed jump error caused by change to repeat code
in version 2.01; execute command now performs correctly, when
previously the code was being skipped; also decreased size
of execute strings by 1 so their size matches specifications.
11Sep92
Version 2.03 fixed jump error causing alarm information to not
be displayed when clock time or date information were not
displayed. 24Sep92
Version 2.04 fixed problem with location of crt status byte
which was causing the computer to lock up if switched from
VGA to MDA mode. 23Oct92
Version 2.1 added /w command to wait specified hours and
minutes from current time to stuff a command to keyboard.
05Oct92
Version 3.0 added the secondary U and A flag to signify for
each task type whether they should be DOS unaware (U) or
aware (A). The default awareness level of each task remains
are specified in version 2.xx. Also added division routine
so that time displayed is correctly 18.2065 ticks per second.
Changed the format of the display and logic to show only task
events which are active. Fixed problem with conflict between
wait task and boot tasks. 29Nov92
Version 3.10 added the capability for any command string to be
a reboot command if the string begins with the ? character.
9May93
Version 3.20 added the capability for changing the computer
date and having the date information internal to the TSR be
updated on the next execution of CLKTIMER. 31May93
Version 3.21 fixed problem with date incrementing correctly
at the end of the month. 5Aug93
Version 4.00 changed event storage method to a stack for repeat,
execute, boot and alarm events to reduce TSR space. Shareware
stack size is 8 events, but can be custimized when ordering
registered version. Also changed the software TSR to return
only code segment with all other code for loading an event moved
to the transient space. Use of a software interrupt for
communicating with the resident code was eliminated and most
of the adjustment code was moved to the transient program
jun/jul93
Version 4.10 added the /U option to unload (empty) the stack
of all pending events 28nov93
Shareware version 4.20 corrected byte comparison code problem
when storing stack events which had resulted ignoring strings
beginning with extended key code (e.g. function keys). 20feb94
DISCLAIMER: The program described above has been tested with MSDOS 3.3,
5.0 and 6.0, and when running under 4DOS and NDOS using
several hardware clones. While it appears to perform
consistently as described, there is absolutely no guarantee
that it will do anything. The author will not be responsible
for any loss or damages caused through the use of this
program. No warranty, express or implied, is provided for
this software, it's performance, or it's usefulness for a
particular purpose.
All trademarks mentioned are the property of their respective
owners.
The program is Copyright 1992, 1993, 1994 by Roger Brook.
You are encouraged to distribute the shareware version of this
program under the following conditions:
- all files contained in the archive or distribution disk
must be distributed together in UNMODIFIED form
- you charge no more than a reasonable fee for copying or
subscription, and clearly indicate that payment of such
a fee does NOT grant ownership of the program
You may evaluate this program for up to 30 days on a free
trial basis. After 30 days, you should register your
continued use of this program. The registration fee is $10
for use on a single computer (please specify disk size
desired), payable to the author at the address given below.
Site license requests in writing will be considered.
Realistically, I don't expect to get rich from this effort.
Registration will get you a copy of the latest version of the
software, without the registration encouragement blurb. I
will listen to and attempt to incorporate suggestions from
registered users. If your suggestion is used, you will
receive a free copy of the updated program.
Send comments and registration to:
Roger Brook
523 Oakdale Drive
Haslett MI 48840
I do have a CompuServe and a Prodigy account, but I do not
monitor them on a regular basis. If you want to send
your comments by electronic mail, sent them to either: 2
internet BROOK@AGE.MSU.EDU
bitnet BROOK@MSUEGR
------------------------------------------------------------------------
REGISTRATION REQUEST FORM
PROGRAM: # COPIES: AMOUNT:
CLKTIMER v4.20 ($15 per copy) _________ $______________
Diskette Type Required: 5-1/4" (360K) ___
3-1/2" (720K) ___
TOTAL. . . . . . . . . . . . . . . . . . . . . . . $______________
PAYMENT BY:
Check/Money Order No.__________ enclosed for $____________________
SHIPPING ADDRESS:
NAME ______________________________________________
ADDRESS LINE 1 ______________________________________________
ADDRESS LINE 2 ______________________________________________
CITY/STATE/PROVINCE ______________________________________________
COUNTRY/POSTAL CODE ______________________________________________
DAYTIME PHONE ______________________________________________
FAX PHONE ______________________________________________
SEND TO: Roger Brook
523 Oakdale Drive
Haslett MI 48840
------------------------------------------------------------------------